package com.province.platform.common.plugin;

import com.province.platform.common.utils.Configuration;

import java.util.Objects;

public abstract class AbstractPlugin implements IPlugin {
    private Configuration pluginConfiguration;

    @Override
    public void setPluginConfiguration(Configuration pluginConfiguration) {
        this.pluginConfiguration = pluginConfiguration;
    }

    @Override
    public Configuration getPluginConfiguration() {
        return this.pluginConfiguration;
    }

    @Override
    public String getPluginName() {
        assert Objects.nonNull(this.pluginConfiguration);
        return this.pluginConfiguration.getString("name");
    }

    public void prepare() {

    }
}
